import numpy as np

def secretToImage(image:np.ndarray,p,s,KI,KD):
    I=image
    [M,N]=I.shape
    bitplaneofI=np.zeros([M,N],dtype=int)
    C=np.zeros([1,8])
    R=np.zeros([M,N])
    E1=np.zeros([M,N])
    E=np.zeros([M,N])
    D=E
    bitplaneofR = bitplaneofI
    bitplaneofE = bitplaneofI
    dst=np.zeros([M,N],dtype=int)
    for i in range(1,M+1):
        for j in range(1,N+1):
            result=